package org.csmzxy.class06;

public class example15 {public static void main(String[] args) {
    Animal animal = new Cat();
    if(animal instanceof Dog){
        Dog dog = (Dog) animal;
        dog.houseKeep();
    }else{
        System.out.println("对象类型向下转换不合法");
    }
}
}
